#include <iostream>

int main() {
    int max(int x, int y);
    int min(int x, int y);
    int (*p)(int, int);
    int a, b, c, n;
    printf("Please enter integer a and b: ");
    scanf("%d %d", &a, &b);
    printf("Please choose 1 or 2: ");
    scanf("%d", &n);
    if (n == 1) {
        p = max;
        printf("max = %d", (*p)(a, b));
    }
    else if (n == 2) {
        p = min;
        printf("min = %d", (*p)(a, b));
    }
    return 0;
}

int max(int x, int y) {
    return (x > y ?  x : y);
}

int min(int x, int y) {
    return (x < y ? x : y);
}